﻿using Microsoft.AspNetCore.Mvc;

namespace SALIRAPI.Controllers
{
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class BaseApiController : ControllerBase
    {
        protected IActionResult ApiResult(bool success, string message, object? data = null)
        {
            return Ok(new
            {
                Success = success,
                Message = message,
                Data = data,
                Timestamp = DateTime.Now
            });
        }
    }
}
